package com.zzx.util;

import com.alibaba.fastjson.JSON;
import com.zzx.exception.ExceptionState;
import org.springframework.http.HttpRequest;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class ResponseWrite {

    public static void ResponseString(HttpServletResponse response, String data){
        response.setCharacterEncoding("utf-8");
        response.setContentType("application/charset=utf8");
        try {
            response.getWriter().write(data);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
